<?php

$db = require __DIR__.'/db.php';

return [
    'db'=>$db,
    'redis'=>[
        'my_redis' => [
            'class' => 'yii\redis\Connection',
            'hostname' => getenv('REDIS_HOSTNAME'),
            'port' => getenv('REDIS_PORT'),
            'password' => getenv('REDIS_PASSWORD')?getenv('REDIS_PASSWORD'):null,
            'database' => getenv('REDIS_DATABASE'),
        ]
    ],
    'swoole'=>[
        'port' => getenv('SWOOLE_PORT'),//监听地址
        'reactor_num' => getenv('SWOOLE_REACTOR_NUM'),
        'worker_num' => getenv('SWOOLE_WORKER_NUM'),
    ],
];